home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / game / patch / WHDIGamesE-F.lzh / EmpireSoccer94.lha / EmpireSoccerHD / Install < prev    next >
Text File  |  2001-02-20  |  4KB  |  200 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "")        ;sub directory containing data files
  4. (set #readme-file "ReadMe")    ;name of readme file
  5. (set #docs-file "Instructions")    ;name of docs file
  6. (set #cleanup "")        ;files to delete after install
  7.  
  8. ;****************************
  9. ;----------------------------
  10. ; checks if given program is installed, if not abort install
  11. ; #program - to check
  12.  
  13. (procedure P_ChkRun
  14.   (if
  15.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  16.     ("")
  17.     (abort
  18.       (cat
  19.     "You must install \"" #program "\" first!\n"
  20.     "It must be accessible via the path.\n"
  21.     "You can find it in the WHDLoad package."
  22.       )
  23.     )
  24.   )
  25. )
  26.  
  27. ;----------------------------
  28. ; Wait for inserting disk
  29. ; IN:  #AD_disk - name of disk
  30. ; OUT: -
  31.  
  32. (procedure P_disk
  33.   (askdisk
  34.     (dest #AD_disk)
  35.     (prompt ("\nInsert Disk \"%s\" in any drive!" #AD_disk))
  36.     (help @askdisk-help)
  37.   )
  38. )
  39.  
  40. ;****************************
  41.  
  42. (if
  43.   (exists #readme-file)
  44.   (if
  45.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  46.     ("")
  47.     (run ("SYS:Utilities/More %s" #readme-file))
  48.   )
  49. )
  50.  
  51. (set #program "WHDLoad")
  52. (P_ChkRun)
  53.  
  54. (set @default-dest
  55.   (askdir
  56.     (prompt ("Where should \"%s\" be installed?\nA drawer \"%s\" will be automatically created." @app-name @app-name))
  57.     (help @askdir-help)
  58.     (default @default-dest)
  59.     (disk)
  60.   )
  61. )
  62. (set #dest (tackon @default-dest @app-name))
  63. (if
  64.   (exists #dest)
  65.   (
  66.     (set #choice
  67.       (askbool
  68.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted?" #dest))
  69.         (default 1)
  70.         (choices "Delete" "Skip")
  71.         (help @askbool-help)
  72.       )
  73.     )
  74.     (if
  75.       (= #choice 1)
  76.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  77.     )
  78.   )
  79. )
  80. (makedir #dest
  81.   (help @makedir-help)
  82.   (infos)
  83. )
  84.  
  85. ;----------------------------
  86.  
  87. (copyfiles
  88.   (help @copyfiles-help)
  89.   (source ("%s.Slave" @app-name))
  90.   (dest #dest)
  91. )
  92. (if
  93.   (exists ("%s.newicon" @app-name))
  94.   (set #icon
  95.     (askchoice
  96.       (prompt "\nWhich icon would you like to install?\n")
  97.       (default 0)
  98.       (choices "Normal" "RomIcon" "NewIcon" "GlowIcon")
  99.       (help @askchoice-help)
  100.     )
  101.   )
  102.   (set #icon 0)
  103. )
  104. (select #icon
  105.   (set #icon ("%s.inf" @app-name))
  106.   (set #icon ("%s.romicon" @app-name))
  107.   (set #icon ("%s.newicon" @app-name))
  108.   (set #icon ("%s.glowicon" @app-name))
  109. )
  110. (copyfiles
  111.   (help @copyfiles-help)
  112.   (source #icon)
  113.   (newname ("%s.info" @app-name))
  114.   (dest #dest)
  115. )
  116. (tooltype
  117.   (dest (tackon #dest @app-name))
  118.   (settooltype "Slave" ("%s.Slave" @app-name))
  119.   (settooltype "PreLoad" "")
  120.   (setdefaulttool "WHDLoad")
  121.   (setstack 10240)
  122.   (noposition)
  123. )
  124. (if
  125.   (exists #readme-file)
  126.   (copyfiles
  127.     (help @copyfiles-help)
  128.     (source #readme-file)
  129.     (dest #dest)
  130.   )
  131. )
  132. (if
  133.   (exists ("%s.info" #readme-file))
  134.   (
  135.     (copyfiles
  136.       (help @copyfiles-help)
  137.       (source ("%s.info" #readme-file))
  138.       (dest #dest)
  139.     )
  140.     (tooltype
  141.       (dest (tackon #dest #readme-file))
  142.       (noposition)
  143.     )
  144.   )
  145. )
  146. (if
  147.   (exists #docs-file)
  148.   (copyfiles
  149.     (help @copyfiles-help)
  150.     (source #docs-file)
  151.     (dest #dest)
  152.   )
  153. )
  154. (if
  155.   (exists ("%s.info" #docs-file))
  156.   (
  157.     (copyfiles
  158.       (help @copyfiles-help)
  159.       (source ("%s.info" #docs-file))
  160.       (dest #dest)
  161.     )
  162.     (tooltype
  163.       (dest (tackon #dest #docs-file))
  164.       (noposition)
  165.     )
  166.   )
  167. )
  168. (if
  169.   (= #sub-dir "")
  170.   ("")
  171.   (
  172.     (set #dest (tackon #dest #sub-dir))
  173.     (makedir #dest
  174.       (help @makedir-help)
  175.     )
  176.   )
  177. )
  178. (copyfiles
  179.   (help @copyfiles-help)
  180.   (source "OSEmu.400")
  181.   (dest #dest)
  182. )
  183.  
  184. ;----------------------------
  185.  
  186. (set #AD_disk "Empire Soccer")
  187. (P_disk)
  188. (copyfiles
  189.   (help @copyfiles-help)
  190.   (source ("%s:" #AD_disk))
  191.   (dest #dest)
  192.   (pattern "(EmpireSoccer)")
  193. )
  194.  
  195. ;----------------------------
  196.  
  197. (run ("Delete %s ALL QUIET FORCE" #cleanup))
  198.  
  199. (exit)
  200.